<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <script src="./js/vue.js"></script>
    <style>
        .inner{
            width: 100px;
            height: 100px;
        }
        .red{
            background-color: red;
        }
    </style>
</head>

<body>
    <div id="app">
        <div :style="{width:200+'px',height:200+'px','background-color':'gray'}" @click.capture="click1">
            <div :class="['inner','red']" @click="click2">
                <button @click="click3">按钮</button>
            </div>
        </div>

        <form action="" @submit.prevent="submit">
            <input type="text" name="username" id="">
            <input type="reset" name="" id="" value="重置">
            <input type="submit" name="" id="" value="提交">
        </form>
    </div>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {

            },
            methods: {
                click1() {
                    console.log("200");
                },
                click2() {
                    console.log("100");
                },
                click3() {
                    console.log("btn");
                },
                submit(){
                    console.log("我要自己处理，不要你提交");
                }
            }
        })
    </script>
</body>

<html>